home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / ViewKit_dev.idb / usr / include / Vk / VkHelpPane.h.z / VkHelpPane.h
Encoding:
C/C++ Source or Header  |  1996-09-20  |  3.1 KB  |  97 lines

  1. ////////////////////////////////////////////////////////////////////////////////
  2. ///////   Copyright 1992, Silicon Graphics, Inc.  All Rights Reserved.   ///////
  3. //                                                                            //
  4. // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;     //
  5. // the contents of this file may not be disclosed to third parties, copied    //
  6. // or duplicated in any form, in whole or in part, without the prior written  //
  7. // permission of Silicon Graphics, Inc.                                       //
  8. //                                                                            //
  9. // RESTRICTED RIGHTS LEGEND:                                                  //
  10. // Use,duplication or disclosure by the Government is subject to restrictions //
  11. // as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data     //
  12. // and Computer Software clause at DFARS 252.227-7013, and/or in similar or   //
  13. // successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -    //
  14. // rights reserved under the Copyright Laws of the United States.             //
  15. //                                                                            //
  16. ////////////////////////////////////////////////////////////////////////////////
  17.  
  18. #ifndef VKHELPPANE_H
  19. #define VKHELPPANE_H
  20.  
  21. #include <Vk/VkSubMenu.h>
  22.  
  23. class VkSimpleWindow;
  24. class VkHelpPane;
  25. class VkMenu;
  26.  
  27. typedef struct {
  28.   VkHelpPane *obj;
  29.   int index;
  30. } VkHelpIndexCallback;
  31.  
  32. typedef struct {
  33.   Boolean valid;
  34.   char *book;
  35.   char *label;
  36.   int belongsTo;
  37.   char *id;
  38.   VkHelpIndexCallback *cb;
  39. } VkHelpTaskInfo;
  40.  
  41. class VkHelpPane : public VkSubMenu {
  42.  
  43.   public:
  44.  
  45.     VkHelpPane(const char *name, 
  46.            VkMenuDesc *desc = NULL, 
  47.            XtPointer defaultClientData = NULL);
  48.  
  49.     VkHelpPane(Widget parent,
  50.            const char *name, 
  51.            VkMenuDesc *desc = NULL, 
  52.            XtPointer defaultClientData = NULL);
  53.  
  54.     virtual ~VkHelpPane();    
  55.  
  56.     virtual const char* className(); 
  57.  
  58.     void setItemSensitivities(Boolean context, Boolean overview, Boolean
  59.                   index, Boolean keys, Boolean tutorial);
  60.  
  61.     Boolean useOldMenuArrangement() { return _useOldMenuArrangement; }
  62.  
  63.  
  64.   protected:
  65.  
  66.     Boolean  _bContext, _bOverview, _bKeys, _bTutorial, _bIndex;
  67.     VkHelpTaskInfo *_info;
  68.     int _numInfo, _sizeInfo;
  69.     Boolean _useOldMenuArrangement;
  70.     char *_windowName;
  71.  
  72.     void create();
  73.     void setSensitivities();
  74.     void readTasks();
  75.     void processOneLine(char *str);
  76.     VkHelpTaskInfo *addTask(char *book, char *label, char *belongsTo,
  77.                 char *id);
  78.     void addTaskActions();
  79.     int addTaskSubAction(VkMenu *parent, int index);
  80.  
  81.     virtual void build(Widget);
  82.  
  83.     
  84.  
  85.   private:
  86.     static  void overviewCallback(Widget, XtPointer, XtPointer);
  87.     static  void onItemCallback(Widget,   XtPointer, XtPointer);
  88.     static  void indexCallback(Widget,    XtPointer, XtPointer);
  89.     static  void versionCallback(Widget,    XtPointer, XtPointer);
  90.     static  void keysCallback(Widget,     XtPointer, XtPointer);
  91.     static  void tutorialCallback(Widget, XtPointer, XtPointer);
  92.     static  void taskCallback(Widget, XtPointer, XtPointer);
  93.     
  94. };
  95.  
  96. #endif
  97.